package com.peak.spring.boot.api.entity;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.MappedSuperclass;

import com.peak.spring.boot.api.constant.Constants;

@MappedSuperclass
public class DefaultStategyEntity extends Identity {

	private static final long serialVersionUID = Constants.SERIAL_VERSION;

	/**
	 * 自增长字段的主键策略，ID的生成交给数据库完成
	 */
	@Override
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return this.id;
	}

}
